Completed
Pull Request — master (#99)
by
unknown
01:08
created

sdk.then-1   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
dl 0
loc 3
rs 10
nop 1
1
var blocktrail = require('../../main');
2
3
var btccom = !!JSON.parse(process.env.BTCCOM);
4
var sdk = blocktrail.BlocktrailSDK({
5
    apiKey : process.env.BLOCKTRAIL_SDK_APIKEY || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APIKEY",
6
    apiSecret : process.env.BLOCKTRAIL_SDK_APISECRET || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APISECRET",
7
    btccom: btccom
8
});
9
10
sdk
11
    .block("000000000000034a7dedef4a161fa058a2d67a173a90155f3a2fe6fc132e0ebf")
12
    .then(function (block) {
13
        console.log(block);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
14
    }, function (error) {
15
        console.log(error);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
16
    });
17
18
sdk
19
    .block("dbaf14e1c476e76ea05a8b71921a46d6b06f0a950f1sdssd7c5f9f1a03b8fae467f10")
20
    .then(function (block) {
21
        console.log(block);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
22
    }, function (error) {
23
        console.log(error);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
24
    });